package stats;

import config.ConfigManager;
import tools.SparqlTools;

/*
 * Class to get information about the provided data out in the triple store
 */
public class SparqlAnalyzer {
	ConfigManager config;
	
	int triplesDBpedia;
	int triplesArticles;
	
	int articles;
	int articleAnnotations;
	Double annotationsPerArticle;

	/**
	 * @param args
	 * @throws InstantiationException 
	 */
	public static void main(String[] args) throws InstantiationException {
		
		SparqlAnalyzer sa = new SparqlAnalyzer(new ConfigManager());
		
		
		System.out.println("## VIRTUOSO STATS ##");
		System.out.println("DBpedia Graph (" + sa.config.getGraphDbpedia()+ ") Triples: " + sa.triplesDBpedia);
		System.out.println("Article Graph (" + sa.config.getGraphTextcorpus()+ ") Triples: " + sa.triplesArticles);
		

	}
	
	public SparqlAnalyzer(ConfigManager config) {
		this.config = config;
		
		
		//triplesDBpedia = SparqlTools.getGraphSize(config.getGraphDbpedia(),config.getVirtuosoJdbc(), config.getVirtuosoAdminUser(), config.getVirtuosoAdminPass());
		
		/* Graph Sizes */
		triplesDBpedia = SparqlTools.getVirtuosoGraphSize(config.getGraphDbpedia(), config);
		triplesArticles = SparqlTools.getVirtuosoGraphSize(config.getGraphTextcorpus(), config);
		
		/* Count Articles and Annotations */
		
		
		
		/* How many Entitys for a specific DBPedia Category?*/
		// TODO rdf:type MeanOfTransPortation
		// oder zuerst alle subclasses holen? oder kann man das mit einem group by fuer alle subclasses machen? oder sogar fuer alle untersten klassen?
		

	}
	
	

}
